import 'package:hotpot/generated/json/base/json_convert_content.dart';
import 'package:hotpot/models/product_ribbon.dart';

ProductRibbon $ProductRibbonFromJson(Map<String, dynamic> json) {
	final ProductRibbon productRibbon = ProductRibbon();
	final int? id = jsonConvert.convert<int>(json['id']);
	if (id != null) {
		productRibbon.id = id;
	}
	final String? html = jsonConvert.convert<String>(json['html']);
	if (html != null) {
		productRibbon.html = html;
	}
	final String? bgColor = jsonConvert.convert<String>(json['bg_color']);
	if (bgColor != null) {
		productRibbon.bgColor = bgColor;
	}
	final String? textColor = jsonConvert.convert<String>(json['text_color']);
	if (textColor != null) {
		productRibbon.textColor = textColor;
	}
	return productRibbon;
}

Map<String, dynamic> $ProductRibbonToJson(ProductRibbon entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['id'] = entity.id;
	data['html'] = entity.html;
	data['bg_color'] = entity.bgColor;
	data['text_color'] = entity.textColor;
	return data;
}